{% extends "base.html" %}

{% block title %}Minijack: Live of an Event{% endblock %}

{% block extra_buttons %}
    <a href="{% url 'device' event.device_id %}">
      <button id="device_button">DEVICE</button></a>
{% endblock %}

{% block body %}
  <h1>Minijack: Life of an Event</h1>

  <div class="container">
    <div class="right">
      <h2>Surrounding Events</h2>
      <table class="screen">
        <tbody>
          {% for event in events_after %}
          <tr>
            <td>
              <a href="{% url 'event' event.event_id %}">
                {{ event.event }} ({{ event.seq }})
              </a>
            </td>
          </tr>
          {% endfor %}
          <tr>
            <th align="left">{{ event.event }} ({{ event.seq }}) </th>
          </tr>
          {% for event in events_before %}
          <tr>
            <td>
              <a href="{% url 'event' event.event_id %}">
                {{ event.event }} ({{ event.seq }})
              </a>
            </td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>

    <div class="left">
      <h2>Event Information</h2>
      <table class="screen">
        <tbody>
          <tr>
            <th align="right">event_id</th>
            <td>{{ event.event_id }}</td>
          </td>
          <tr>
            <th align="right">device_id</th>
            <td>
              <a href="{% url 'device' event.device_id %}">
                {{ event.device_id }}
              </a>
            </td>
          </td>
          <tr>
            <th align="right">time</th>
            <td>{{ event.time }}</td>
          </td>
          <tr>
            <th align="right">event</th>
            <td>{{ event.event }}</td>
          </td>
          <tr>
            <th align="right">seq</th>
            <td>{{ event.seq }}</td>
          </td>
          <tr>
            <th align="right">log_id</th>
            <td>{{ event.log_id }}</td>
          </td>
          <tr>
            <th align="right">prefix</th>
            <td>{{ event.prefix }}</td>
          </td>
          <tr>
            <th align="right">boot_sequence</th>
            <td>{{ event.boot_sequence }}</td>
          </td>
          <tr>
            <th align="right">boot_id</th>
            <td>{{ event.boot_id }}</td>
          </td>
          <tr>
            <th align="right">factory_md5sum</th>
            <td>{{ event.factory_md5sum }}</td>
          </td>
          <tr>
            <th align="right">reimage_id</th>
            <td>{{ event.reimage_id }}</td>
          </td>
        </tbody>
      </table>
    </div>
  </div>

  <h2>Attribute Information</h2>
  <table class="screen">
    <tbody>
      {% for attr in attrs %}
      <tr>
        <th align="left">{{ attr.attr }}</th>
        <td>{{ attr.value|linebreaks }}</td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
{% endblock %}
